package com.ruoyi.web.controller.student_club.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.student_club.service.IClubExamineService;
import com.ruoyi.student_club.vo.app.ClubExamineVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author lin
 * @Date 2022/2/17 16:56
 */
@RestController
@RequestMapping("/app/examine")
public class ExamineController {

    @Resource
    private IClubExamineService examineService;

    /**
     * 获取我的审核详情
     * @param userId
     * @return
     */
    @GetMapping("/getExamineList")
    public AjaxResult getExamineList(Long userId){
        List<ClubExamineVo> examineList = examineService.getExamineList(userId);
        return AjaxResult.success(examineList);
    }

    /**
     * 各个状态列表
     * @param userId
     * @param state
     * @return
     */
    @GetMapping("/detail")
    public AjaxResult getExamineDetail(Long userId,Integer state){
        List<ClubExamineVo> detail = examineService.detail(userId, state);
        return AjaxResult.success(detail);
    }

}
